import string
Str = input("请输入一个字符串： ")
letters = 0
space = 0
digit = 0
others = 0
i=0
while i < len(Str):
    h = Str[i]
    i+=1
    if h.isalpha():
        letters += 1
    elif h.isspace():
        space+=1
    elif h.isdigit():
        digit +=1
    else :
        others +=1
print("英文字母出现的次数：",letters,"次")
print("空格出现的次数：",space,"次")
print("数字字母出现的次数：",digit,"次")
print("其他字符出现的次数：",others,"次")
